package com.gd.iot.energy.service.dailymanage;

import com.baomidou.mybatisplus.extension.service.IService;
import com.gd.iot.energy.consts.SystemConsts;
import com.gd.iot.energy.po.dailymanage.OperationfeeChargePO;
import com.gd.iot.energy.pojo.common.vo.PageVO;
import com.gd.iot.energy.pojo.dailymanage.vo.ChargeBookPageVO;
import com.gd.iot.energy.pojo.dailymanage.vo.ChargeQueryPageVO;
import com.gd.iot.energy.pojo.dailymanage.vo.ChargeStatisticsPageVO;
import com.gd.iot.energy.pojo.dailymanage.vo.InvoicePageVO;

import java.math.BigDecimal;
import java.util.List;

/**
 * 收费记录
 *
 * @author kris
 * @date Created at 8:27 上午 2020/8/8
 */
public interface OperationfeeChargeService  extends IService<OperationfeeChargePO> {

    /**
     * 收费记录
     * @param operatingfeeSettlementTypeEnum 缴费方式
     * @param fee 缴费金额
     * @param operatingfeePaywayEnum 支付方式
     * @param energyType 表类型
     * @param chargeType 收费类型（退费、收费等）
     * @param customerFee 余额
     * @param areaArchiveId 关联档案
     * @param receNumber 收据编号
     */
    void saveOperationfeeCharge(SystemConsts.OperatingfeeSettlementTypeEnum operatingfeeSettlementTypeEnum
            , BigDecimal fee, SystemConsts.OperatingfeePaywayEnum operatingfeePaywayEnum, Integer energyType,
                                SystemConsts.ChargeType chargeType, BigDecimal customerFee, Long areaArchiveId, String receNumber);

    /**
     * 收费统计分页接口
     * @param operatorId
     * @param cycle
     * @param date
     * @param areaId
     * @param payway
     * @param paychannel
     * @param pageSize
     * @param pageNum
     * @param orderColumn
     * @param orderType
     * @return
     */
    PageVO<ChargeStatisticsPageVO> getChargeStatisticsPageVO(Integer operatorId, String cycle, String date, Integer areaId, Integer payway, Integer paychannel, Integer pageSize, Integer pageNum, String orderColumn, String orderType);

    /**
     * 导出收费统计
     * @param operatorId
     * @param cycle
     * @param date
     * @param areaId
     * @param payway
     * @param paychannel
     * @param orderColumn
     * @param orderType
     */
    void exportChargeStatisticsExce(Integer operatorId, String cycle, String date, Integer areaId, Integer payway, Integer paychannel, String orderColumn, String orderType);

    /**
     * 收费查询分页
     *
     * @param chargeType
     * @param customerSerialnumber
     * @param customerName
     * @param cycle
     * @param date
     * @param areaId
     * @param payway
     * @param paychannel
     * @param pageSize
     * @param pageNum
     * @param orderColumn
     * @param orderType
     * @return
     */
    PageVO<ChargeQueryPageVO> getChargeListPageVO(SystemConsts.ChargeType chargeType, String customerSerialnumber, String customerName, String cycle, String date, Integer areaId, Integer payway, Integer paychannel, Integer pageSize, Integer pageNum, String orderColumn, String orderType);

    /**
     * 导出收费查询
     *
     * @param chargeType
     * @param customerSerialnumber
     * @param customerName
     * @param cycle
     * @param date
     * @param areaId
     * @param payway
     * @param paychannel
     * @param orderColumn
     * @param orderType
     * @return
     */
    void exportChargeListExcel(SystemConsts.ChargeType chargeType, String customerSerialnumber, String customerName, String cycle, String date, Integer areaId, Integer payway, Integer paychannel, String orderColumn, String orderType);

    /**
     * 收费台账
     * @param cycle
     * @param date
     * @param areaId
     * @param pageSize
     * @param pageNum
     * @return
     */
    PageVO<ChargeBookPageVO> getChargeBookPageVO(String cycle, String date, Integer areaId, Integer pageSize, Integer pageNum);

    /**
     * 导出台账
     * @param cycle
     * @param date
     * @param areaId
     */
    void exportChargeBookExcel(String cycle, String date, Integer areaId);

    /**
     * 发票管理
     * @param customerSerialnumber
     * @param customerName
     * @param hasInvoice
     * @param beginDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @param orderColumn
     * @param orderType
     * @return
     */
    PageVO<InvoicePageVO> getInvoicePageVO(String customerSerialnumber, String customerName, Integer hasInvoice, String beginDate, String endDate, Integer pageSize, Integer pageNum, String orderColumn, String orderType);

    /**
     * 开票
     * @param ids
     */
    void invoice(List<Integer> ids);

    /**
     * 开票记录
     * @param customerSerialnumber
     * @param customerName
     * @param beginDate
     * @param endDate
     * @param pageSize
     * @param pageNum
     * @return
     */
    PageVO<InvoicePageVO> getInvoiceRecordPageVO(String customerSerialnumber, String customerName,
                                                 String beginDate, String endDate,
                                                 Integer pageSize, Integer pageNum);
}
